import { JsonController, Post, UploadedFile, UploadedFiles } from 'routing-controllers';
import { Inject } from 'typedi';
import FileService from '../services/FileService';
import Response from '../common/response'
@JsonController("/file")
export class FileController {
    @Inject()
    fileService: FileService;
    @Post()
    async uploadFile(@UploadedFiles("file") files: any[]) {
        const reslut = await this.fileService.saveFile(files)
        return Response.SUCCESS(reslut)
    }
}